the first stat to calculate is speed. this can be done easily by anyone with a pen and paper. all you have to do is look at the pokemons minimum and maximum stats, and write down what pokemon the pokemon has outsped and not outsped.
the rest of these stats will likely require my tools to figure out. all of my tools are charts in desmos. the first stat to calculate is hp. knowing this exact stat itself isnt very useful, but it helps calculate the remaining stats. this is what the graph in desmos should look like:
https://www.smogon.com/forums/attachments/1704220501915png.587175/(i couldnt add this one for some reason)
this is the equation pokemon uses to calculate hp. h represents the pokemons base hp stat, and p represents the percentage of hp the pokemon is on, which is something showdown does show. the black lines are there to show you the minimum and maximum hp that the pokemon could have. technically x=0 dosent show the minimum hp the pokemon could have, because the equation assumes that the pokemon has 31 ivs in hp, but you will almost never see a pokemon not have that, so it dosent really matter. floor rounds down the hp stat so we dont have weird decimals, because pokemon rounds down for some reason.
next is defence and special defence. this one is a lot more complicated. your graph should look like this:
the top left equation represents the maximum possible attack, and the one on the top right represents the minimum. this equation essentially emulates the pokemon damage formula. here are what all the variables represent. a=your mons attack, p=power of a move your pokemon used, o=damage multipliers, b=maximum damage possibly done from the move, c=minimum damage possibly done from the move, z=targets base defence stat, and m=stat stages. floor is here for the same reason as last time. the black lines represent the minimum and maximum stats that the opponents pokemon could have. the blue area represents the damage done by the attack. you use the graph by taking the percentage of the opponents health that one of your attacks did, plugging it into the hp graph, and plugging in the rest of the numbers. the overlap between the blue and red spaces are the possibilities for that stat. as you do more damage, you can add more blue spaces with different values to narrow it down more. the reason i have c/c, b/b, z/z, and x/x is because desmos is weird and wont let me assign variables unless it is in the first equation. unfortunately, all of these graphs fail to acount for possible items. if you know what item your opponent has, you can plug it in, but the equation does not acount for scenarios where an unknown item affects the damage. these graphs also assume that your pokemon is at level 100, so you will have to modify this if you want to use it for random battles or little cup.
last is attack and special attack. your graph should look like this:
the same basics as the defence one applies, but with a few key differences. since you know exactly how much hp you have, you dont need variables for that. instead of a for attack, you have d for defence. and while you would use the defence one when your opponent is attacked, you use this one when you are attacked.
will this help anyone? who knows. while this would help you get percise calcs, you will probobly be timed out by the time you get the data.
in case the images dont show up for you, here are the equations you will need to type in to desmos
hp:
y=\frac{\operatorname{floor}\left(2\cdot h+31+x+110\right)}{100}\cdot p
0\le x\le63
defence:
\operatorname{floor}\left(\left(\frac{\left(42\cdot p\cdot\frac{a}{x}\right)}{50}+2\right)\cdot o\cdot\frac{b}{b}\cdot\frac{c}{c}\cdot\frac{z}{z}\cdot\frac{m}{m}\right)\ge y\ge\operatorname{floor}\left(\left(\frac{\left(42\cdot p\cdot\frac{a}{x}\right)}{50}+2\right)\cdot.85\cdot o\right)
b\le y\le c
\operatorname{floor}\left(\left(2z+5\right)\cdot.9\cdot m\right)\le x\le\operatorname{floor}\left(\left(2z+99\right)\cdot1.1\cdot m\right)
attack:
\operatorname{floor}\left(\left(\frac{\left(42\cdot p\cdot\frac{x}{d}\right)}{50}+2\right)\cdot o\cdot\frac{z}{z}\cdot\frac{m}{m}\right)\ge y\ge\operatorname{floor}\left(\left(\frac{\left(42\cdot p\cdot\frac{x}{d}\right)}{50}+2\right)\cdot.85\cdot o\right)
y=70
\operatorname{floor}\left(\left(2z+5\right)\cdot.9\cdot m\right)\le x\le\operatorname{floor}\left(\left(2z+99\right)\cdot1.1\cdot m\right)
btw, i realised that if you want to acount for items, you can just duplicate the black and/or red functions and add a multiplier.
the rest of these stats will likely require my tools to figure out. all of my tools are charts in desmos. the first stat to calculate is hp. knowing this exact stat itself isnt very useful, but it helps calculate the remaining stats. this is what the graph in desmos should look like:
https://www.smogon.com/forums/attachments/1704220501915png.587175/(i couldnt add this one for some reason)
this is the equation pokemon uses to calculate hp. h represents the pokemons base hp stat, and p represents the percentage of hp the pokemon is on, which is something showdown does show. the black lines are there to show you the minimum and maximum hp that the pokemon could have. technically x=0 dosent show the minimum hp the pokemon could have, because the equation assumes that the pokemon has 31 ivs in hp, but you will almost never see a pokemon not have that, so it dosent really matter. floor rounds down the hp stat so we dont have weird decimals, because pokemon rounds down for some reason.
next is defence and special defence. this one is a lot more complicated. your graph should look like this:
the top left equation represents the maximum possible attack, and the one on the top right represents the minimum. this equation essentially emulates the pokemon damage formula. here are what all the variables represent. a=your mons attack, p=power of a move your pokemon used, o=damage multipliers, b=maximum damage possibly done from the move, c=minimum damage possibly done from the move, z=targets base defence stat, and m=stat stages. floor is here for the same reason as last time. the black lines represent the minimum and maximum stats that the opponents pokemon could have. the blue area represents the damage done by the attack. you use the graph by taking the percentage of the opponents health that one of your attacks did, plugging it into the hp graph, and plugging in the rest of the numbers. the overlap between the blue and red spaces are the possibilities for that stat. as you do more damage, you can add more blue spaces with different values to narrow it down more. the reason i have c/c, b/b, z/z, and x/x is because desmos is weird and wont let me assign variables unless it is in the first equation. unfortunately, all of these graphs fail to acount for possible items. if you know what item your opponent has, you can plug it in, but the equation does not acount for scenarios where an unknown item affects the damage. these graphs also assume that your pokemon is at level 100, so you will have to modify this if you want to use it for random battles or little cup.
last is attack and special attack. your graph should look like this:
the same basics as the defence one applies, but with a few key differences. since you know exactly how much hp you have, you dont need variables for that. instead of a for attack, you have d for defence. and while you would use the defence one when your opponent is attacked, you use this one when you are attacked.
will this help anyone? who knows. while this would help you get percise calcs, you will probobly be timed out by the time you get the data.
in case the images dont show up for you, here are the equations you will need to type in to desmos
hp:
y=\frac{\operatorname{floor}\left(2\cdot h+31+x+110\right)}{100}\cdot p
0\le x\le63
defence:
\operatorname{floor}\left(\left(\frac{\left(42\cdot p\cdot\frac{a}{x}\right)}{50}+2\right)\cdot o\cdot\frac{b}{b}\cdot\frac{c}{c}\cdot\frac{z}{z}\cdot\frac{m}{m}\right)\ge y\ge\operatorname{floor}\left(\left(\frac{\left(42\cdot p\cdot\frac{a}{x}\right)}{50}+2\right)\cdot.85\cdot o\right)
b\le y\le c
\operatorname{floor}\left(\left(2z+5\right)\cdot.9\cdot m\right)\le x\le\operatorname{floor}\left(\left(2z+99\right)\cdot1.1\cdot m\right)
attack:
\operatorname{floor}\left(\left(\frac{\left(42\cdot p\cdot\frac{x}{d}\right)}{50}+2\right)\cdot o\cdot\frac{z}{z}\cdot\frac{m}{m}\right)\ge y\ge\operatorname{floor}\left(\left(\frac{\left(42\cdot p\cdot\frac{x}{d}\right)}{50}+2\right)\cdot.85\cdot o\right)
y=70
\operatorname{floor}\left(\left(2z+5\right)\cdot.9\cdot m\right)\le x\le\operatorname{floor}\left(\left(2z+99\right)\cdot1.1\cdot m\right)
btw, i realised that if you want to acount for items, you can just duplicate the black and/or red functions and add a multiplier.
Attachments

154.9 KB Views: 6

143.3 KB Views: 10

23 KB Views: 16

96.9 KB Views: 22
Last edited: